home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / debug / clrdebug.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-01-07  |  2.5 KB  |  84 lines

  1. VERSION 2.00
  2. Begin Form frmClrDebug 
  3.    BorderStyle     =   0  'None
  4.    ClientHeight    =   2085
  5.    ClientLeft      =   6495
  6.    ClientTop       =   3645
  7.    ClientWidth     =   2640
  8.    ControlBox      =   0   'False
  9.    Height          =   2490
  10.    Left            =   6435
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   2085
  15.    ScaleWidth      =   2640
  16.    Top             =   3300
  17.    Width           =   2760
  18.    Begin CommandButton cmdExit 
  19.       Caption         =   "&Exit"
  20.       Height          =   285
  21.       Left            =   450
  22.       TabIndex        =   1
  23.       Top             =   0
  24.       Width           =   465
  25.    End
  26.    Begin CommandButton cmdClearDebug 
  27.       Caption         =   "&Cls"
  28.       Height          =   285
  29.       Left            =   0
  30.       TabIndex        =   0
  31.       Top             =   0
  32.       Width           =   465
  33.    End
  34. Sub cmdClearDebug_Click ()
  35. Dim hWnd As Integer
  36. Dim intResult As Integer
  37.     hWnd = FindWindow("Microsoft Visual Basic", 1)
  38.     intResult = SetFocusAPI(hWnd)
  39.     SendKeys "%{r}"
  40.     SendKeys "k"
  41.     hWnd = FindWindow("Debug Window", 1)
  42.     intResult = SetFocusAPI(hWnd)
  43.     SendKeys "^{HOME}", True
  44.     SendKeys "^(+{END})", True
  45.     SendKeys "{DELETE}"
  46. End Sub
  47. Sub cmdExit_Click ()
  48.     'This will put "Always Visible" off!
  49.     SetWindowPos frmClrDebug.hWnd, -2, 0, 0, 0, 0, &H50
  50.     Unload Me
  51. End Sub
  52. Sub Form_Load ()
  53. ' MODIFIED BY   Don Blaylock 73132,1073
  54. '               Systems Analyst,
  55. '               Computer Associates, Inc.
  56. '               January 8, 1995
  57.     cmdClearDebug.Top = 0
  58.     cmdClearDebug.Left = 0
  59.     cmdExit.Left = cmdClearDebug.Width
  60.     Me.Height = cmdClearDebug.Height
  61.     Me.Width = cmdClearDebug.Width + cmdExit.Width
  62.     Select Case UCase$(Command$)
  63.         Case "TR"   ' Top Right
  64.             Me.Left = Screen.Width - Me.Width
  65.             Me.Top = 0
  66.         
  67.         Case "BR"   ' Bottom Right
  68.             Me.Left = Screen.Width - Me.Width
  69.             Me.Top = Screen.Height - Me.Height
  70.         
  71.         Case "TL"   ' Top Left
  72.             Me.Left = 0
  73.             Me.Top = 0
  74.         Case "BL"   ' Bottom Left
  75.             Me.Left = 0
  76.             Me.Top = Screen.Height - Me.Height
  77.         Case Else
  78.             ' No Button On The Desktop
  79.             ' Just Clear the Debug Window & Exit
  80.             cmdClearDebug_Click
  81.             End
  82.     End Select
  83. End Sub
  84.